<?php

namespace app\api\controller\fishing;

use app\common\controller\Api;

/**
 * 天天去钓鱼用户相关接口
 */
class Skill extends Api
{

    protected $noNeedLogin = ['*'];
    protected $noNeedRight = ['*'];

    public $base_count_num = 2; // 钓鱼数量基数
    public $base_depth_num = 40; // 钓鱼深度基数
    public $base_offline_num = 9; // 离线收益基数

    public $base_count_next_pay = 290; // 钓鱼数量下次花费基数
    public $base_depth_next_pay = 290; // 钓鱼深度下次花费基数
    public $base_offline_next_pay = 290; // 离线收益下次花费基数

    // 钓鱼数量
    public function count_num($level)
    {
        return $this->base_count_num + $level;
    }

    // 钓鱼数量下次花费
    public function count_next_pay($level)
    {
        return ceil($this->base_count_next_pay * pow(1.085, $level));
    }

    // 钓鱼深度
    public function depth_num($level)
    {
        return $this->base_depth_num + 5 * $level;
    }

    // 钓鱼深度下次花费
    public function depth_next_pay($level)
    {
        return ceil($this->base_depth_next_pay * pow(1.085, $level));
    }

    // 钓鱼数量
    public function offline_num($level)
    {
        return $this->base_offline_num + 5 * $level;
    }

    // 钓鱼数量下次花费
    public function offline_next_pay($level)
    {
        return ceil($this->base_offline_next_pay * pow(1.085, $level));
    }
}
